package com.yanqu.road.server.manger.kowloon.battle.role.hero;

import com.yanqu.road.entity.kowloon.enums.battle.eKowloonBulletType;
import com.yanqu.road.server.manger.kowloon.battle.KowloonGame;
import com.yanqu.road.server.manger.kowloon.battle.role.bullet.KowloonBullet;
import com.yanqu.road.server.manger.kowloon.battle.role.enemy.KowloonEnemy;

public class KowloonHero7 extends KowloonHero {

    public KowloonHero7(KowloonGame game) {
        super(game);
    }

    @Override
    public void attack() {
        if (this.targetEnemys != null && this.targetEnemys.size() > 0) {
            KowloonEnemy enemy = this.targetEnemys.get(0);
            if (enemy.pos.getY() >= this.pos.getY()) {
                KowloonBullet.addBullet(game, eKowloonBulletType.Bee, this, null, 90);
                if (this.data.getProperty().getBullet() > 1) {
                    KowloonBullet.addBullet(game, eKowloonBulletType.Bee, this, null, 73);
                    KowloonBullet.addBullet(game, eKowloonBulletType.Bee, this, null, 107);
                }
            } else {
                KowloonBullet.addBullet(game, eKowloonBulletType.Bee, this, null, -90);
                if (this.data.getProperty().getBullet() > 1) {
                    KowloonBullet.addBullet(game, eKowloonBulletType.Bee, this, null, -73);
                    KowloonBullet.addBullet(game, eKowloonBulletType.Bee, this, null, -107);
                }
            }
        }
        this.cd();
    }
}
